﻿using System;
using System.Collections.Generic;
using System.Windows.Interactivity;
using SD.Shapes.Common;
using SD.Shapes.Common.Interactivity;
using SD.Shapes.Templates.Basic;
using SD.Utils.Windows.Interactivity;
using System.ComponentModel;
using System.Windows.Media;

namespace ERDDiagram
{
    public class MyNode : NodeBase, INotifyPropertyChanged
    {
        public MyNode()
        {
            DefaultStyleKey = typeof(MyNode);

            BehaviorCollection behaviors = Interactions.GetBehaviors(this);
            behaviors.Add(new ShapeSelectionBehavior());
            behaviors.Add(new ShapeBaseMovementBehavior());
            behaviors.Add(new ShapeSelectionBehavior());
            AdornerCollection adorners = Interactions.GetAdorners(this);
            adorners.Add(new NodeBaseScalingAdorner());
        }
        public bool IsCustomEntity { get; set; }
        public bool IsManagedEntity { get; set; }
        
        public Brush CustomBackground
        {
            get { return _CustomBackground; }
            set
            {
                if (_CustomBackground != value)
                {
                    Brush old = _CustomBackground;
                    _CustomBackground = value;

                }
            }
        }
        private Brush _CustomBackground = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0x0C));

        public IList<ERDDiagram.ViewModel.AttributeClass> Items
        {
            get { return _Items; }
            set
            {
                if (_Items != value)
                {
                    System.Collections.IEnumerable old = _Items;
                    _Items = value;
                                        
                }
            }
        }
        private IList<ERDDiagram.ViewModel.AttributeClass> _Items = new List<ERDDiagram.ViewModel.AttributeClass>();


        public IList<ERDDiagram.ViewModel.AttributeClass> RemovedItems
        {
            get { return _RemovedItemsItems; }
            set
            {
                if (_RemovedItemsItems != value)
                {
                    System.Collections.IEnumerable old = _RemovedItemsItems;
                    _RemovedItemsItems = value;
                    
                }
            }
        }
        private IList<ERDDiagram.ViewModel.AttributeClass> _RemovedItemsItems = new List<ERDDiagram.ViewModel.AttributeClass>();


        public event PropertyChangedEventHandler PropertyChanged;
    }
}
